package Demo;

import java.util.HashSet;

/**
 * @author げっしょく
 * @date 2021/7/26
 */
public class HashSetTest {
    public static void main(String[] args) {
        HashSet<Student> hs = new HashSet<>();
        Student stu1 = new Student("zhangsan", 20, 60, 70);
        Student stu2 = new Student("wangwu", 25, 60, 70);
        Student stu3 = new Student("lisi", 24, 60, 70);
        Student stu5 = new Student("zhaoliu", 27, 60, 70);
        Student stu4 = new Student("lisi", 24, 60, 70);
        hs.add(stu1);
        hs.add(stu2);
        hs.add(stu3);
        hs.add(stu4);
        hs.add(stu5);
        for (Student h : hs) {
            System.out.println(h);
        }
    }
}
